package cn.iocoder.yudao.module.reading.controller.app.plan.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/**
 * 每日任务 Response VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 每日任务 Response VO")
@Data
public class DailyTaskRespVO {

    @Schema(description = "任务日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-01-06")
    private LocalDate date;

    @Schema(description = "计划第几天", requiredMode = Schema.RequiredMode.REQUIRED, example = "6")
    private Integer dayNumber;

    @Schema(description = "任务列表")
    private List<TaskItemVO> tasks;

    @Schema(description = "任务项")
    @Data
    public static class TaskItemVO {
        @Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long id;

        @Schema(description = "任务类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "new_learning")
        private String taskType;

        @Schema(description = "绘本信息")
        private BookInfoVO book;

        @Schema(description = "是否完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
        private Boolean isCompleted;

        @Schema(description = "任务排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Integer sortOrder;
    }

    @Schema(description = "绘本信息")
    @Data
    public static class BookInfoVO {
        @Schema(description = "绘本ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        private Long id;

        @Schema(description = "绘本标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "The Magic Key")
        private String title;

        @Schema(description = "封面图片URL", example = "https://example.com/book10.jpg")
        private String cover;

        @Schema(description = "绘本集标题", example = "牛津树1级")
        private String bookSetTitle;
    }

}
